package com.slz3.business.module.messageManagement.mesType.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.messageManagement.mesType.domain.MesType;
import com.slz3.business.module.messageManagement.mesType.domain.MesTypeCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Component
public class MesTypeResAtomic {

    public Mono<ServerResponse> add_$MesTypeUpdateLock(ServerRequest req, MesType mesType) {
        return MesTypeResSafeValid.add(req, mesType) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesTypeResExecutor.add(req, mesType);
    }

    public Mono<ServerResponse> delete_$MesTypeUpdateLock(ServerRequest req, MesTypeCondition mesTypeCondition) {
        return MesTypeResSafeValid.delete(req, mesTypeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesTypeResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$MesTypeUpdateLock(ServerRequest req, MesType mesType) {
        return MesTypeResSafeValid.modify(req, mesType) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesTypeResExecutor.modify(req, mesType);
    }

    public Mono<ServerResponse> info_$MesTypeUpdateLock(ServerRequest req) {
        return MesTypeResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesTypeResExecutor.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$MesTypeUpdateLock(ServerRequest req, MesTypeCondition mesTypeCondition) {
        return MesTypeResSafeValid.auditSubmit(req, mesTypeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesTypeResExecutor.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$MesTypeUpdateLock(ServerRequest req, MesTypeCondition mesTypeCondition) {
        return MesTypeResSafeValid.audit(req, mesTypeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesTypeResExecutor.audit(req);
    }

    public Mono<ServerResponse> auditReject_$MesTypeUpdateLock(ServerRequest req, MesTypeCondition mesTypeCondition) {
        return MesTypeResSafeValid.auditReject(req, mesTypeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesTypeResExecutor.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$MesTypeUpdateLock(ServerRequest req, MesTypeCondition mesTypeCondition) {
        return MesTypeResSafeValid.usingEnable(req, mesTypeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesTypeResExecutor.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$MesTypeUpdateLock(ServerRequest req, MesTypeCondition mesTypeCondition) {
        return MesTypeResSafeValid.usingDisable(req, mesTypeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                MesTypeResExecutor.usingDisable(req);
    }
}
